package gui;

import java.awt.Color;
import javax.swing.text.SimpleAttributeSet;
import javax.swing.text.StyleConstants;

/**
 * Trida predstavujici barevne schema jednoho kontaktu
 */
public class ColorScheme {
	
	private SimpleAttributeSet normalStyle;
    private SimpleAttributeSet nameStyle;
    private SimpleAttributeSet timeStyle;
	
	public ColorScheme(){
		Color color = new Color((int)(Math.random()*255), (int)(Math.random()*255), (int)(Math.random()*255));
		normalStyle = new SimpleAttributeSet();
        StyleConstants.setForeground(normalStyle, Color.BLACK);
        nameStyle = new SimpleAttributeSet();
        StyleConstants.setForeground(nameStyle, color);
        StyleConstants.setBold(nameStyle, true);
        timeStyle = new SimpleAttributeSet();
        StyleConstants.setForeground(timeStyle, color);
        System.out.println("Barva " + color.getRed() + " : " + color.getGreen() + " : " + color.getBlue());
	}

	public SimpleAttributeSet getNormalStyle(){
		return normalStyle;
	}

	public SimpleAttributeSet getNameStyle(){
		return nameStyle;
	}

	public SimpleAttributeSet getTimeStyle(){
		return timeStyle;
	}
}
